<template>
	<uni-popup ref="infoPopup"  animation="true">
		<slot name="popcontent"></slot>
	</uni-popup>
</template>

<script setup>
	const infoPopup = ref(null); //infoPopup 这个名字要和uni-popup 组件定义的ref一样
	const popupLayer = () => {
		infoPopup.value.open('bottom');
	}
	
	const closePopupLayer=()=>{
		infoPopup.value.close()
	}
	
	//通过defineExpose方法把子组件的方法暴露给父组件
	defineExpose({
		popupLayer,
		closePopupLayer
	});
</script>

<style lang="scss" scoped>

</style>